package com.xizi.chatBot.model;

import lombok.Data;
import org.springframework.ai.chat.messages.Message;
import org.springframework.ai.ollama.api.OllamaApi;

@Data
public class MessageVO {
    private String role;
    private String content;

    public MessageVO(Message message){
        switch (message.getMessageType()){
            case USER -> {role = "user"; break;}
            case ASSISTANT -> {role = "assistant"; break;}
            case SYSTEM -> {role = "system"; break;}
            case TOOL -> {role = "tool"; break;}
        }
        this.content = message.getText();
    }


}
